package view.mediators
{
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	import view.Debug;
	
	public class DebugMediator extends Mediator implements IMediator
	{
		public static const NAME:String = "DebugMediator";
		
		public function DebugMediator(view:Debug)
		{
			super(NAME, view);
		}
		
		public function get debug():Debug{
			return viewComponent as Debug;
		}
		
		override public function listNotificationInterests():Array{
			return [
					BoardFacade.DEBUG
					];
		}
		
		override public function handleNotification(notification:INotification):void{
			switch(notification.getName()){
				case BoardFacade.DEBUG:
					debug.txtDebug.text += notification.getBody() as String;
					break;
			}
		}

	}
}